runIfNotNull

inline fun <T, A> T.runIfNotNull(value: A?, action: T.(A) -> T): T(source)

Transforms the receiver with the provided action if the value is not null. Otherwise, returns the unmodified receiver.